<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<script type="text/javascript">
	function submitform() {
		$.post('addformsubmit.action', $(".form1").serialize()).success(
				function(success) {
					alert('success' + success);
				}).error(function(error) {
			if (error.responseText.indexOf("mockprgrop1extype401") > 0)
				alert('Dang nhap khong thanh cong');
		});
	}
</script>
<style type="text/css">
ul.msg {
	list-style: none;
	padding: 0;
	margin: 0;
}
</style>
</head>
<body>
	<s:actionmessage cssClass="msg" />
	<form action="addformsubmit.action" class="form1" method="post">
		<input name="firstname" /> <input type="button"
			onclick="submitform()" value="Add Now" />
	</form>
	<script type="text/javascript" src="js/web.js"></script>
</body>
</html>